package com.inforim.cognos.plugins;

import java.rmi.RemoteException;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import com.cognos.developer.schemas.bibus._3.BaseParameter;
import com.cognos.developer.schemas.bibus._3.ContentManagerServiceStub;
import com.cognos.developer.schemas.bibus._3.ReportServiceStub;
import com.inforim.cognos.CognosClient;
import com.inforim.cognos.CognosPlugin;
import com.inforim.module.CogUser;

public interface CognosReportPlugin extends CognosPlugin {

	boolean runReport(ContentManagerServiceStub cmStub,
			ReportServiceStub repStub, String path, String params,
			String saveAs, Properties props);

	boolean runSpec(ContentManagerServiceStub cmStub,
			ReportServiceStub repStub, String specXml, String params,
			String saveAs, Properties props);

	void loadReport(ContentManagerServiceStub cmStub,
			ReportServiceStub repStub, String path, String params, String saveAs);

	BaseParameter[] getReportParameters(ReportServiceStub repStub, String path)
			throws RemoteException;

	BaseParameter[] getSpecParameters(ReportServiceStub repStub, String specXml)
			throws RemoteException;

	@SuppressWarnings("rawtypes")
	Map queryReportParams(String specXml,
			BaseParameter[] parameters) throws Exception;

	String queryReportSpec(String path) throws RemoteException;

	String executeReportSpec(String specXml, String params, String saveType)
			throws RemoteException;

	void setClient(CognosClient client);

	CognosClient getClient();

	void setUseEcho(boolean useEcho);

	boolean isUseEcho();
	//cognosopt
//	void getRolePerFromCogObj(String obj_searchpath);
//	void getUserFromRole(String rolesearchpath);
//	List<CogUser> getUserlist();
//	void setUserlist(List<CogUser> userlist);

}
